<template>
  <div id="app">
    <keep-alive>
      <router-view />
    </keep-alive>

<van-tabbar route v-if="path">
  <van-tabbar-item replace to="/" icon="home-o">首页</van-tabbar-item>
  <van-tabbar-item replace to="/User" icon="user-o">我的</van-tabbar-item>
</van-tabbar>
  </div>
</template>

<script>
export default {
  name: 'Main',
  computed: {
    // 在文章界面不显示底部导航
    path () {
      const nowPath = ['/article/', '/User', '/']

      if (nowPath.indexOf(this.$route.path) !== -1) {
        return true
      }
      return false
    }
  }
}
</script>
<style lang="less">

</style>
